<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>this is content, and data is :<span id="data"></span></div>
<button id="button">click</button>
</body>
<script>
    let index = 0

    function doReq() {
        const data = document.getElementById('data')
        data.innerText=''
        fetch('/data', {
            headers: {
                'X-Test-Cache': index++
            }
        }).then(res => {
            return res.text()
        }).then((text) => {
            data.innerText = text
        })
    }

    document.getElementById('button').addEventListener('click', doReq)
</script>
</html>